<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
  <div class="div1">
    <p class="content"></p>
  </div>
</body>
<script>
  window.onload = function(){
    setInterval(function(){
      $.ajax({
        url: 'http://localhost:8081/findNodeKind',
        type: 'GET',
        dataType: 'json',
        timeout: 1000,
        cache: false,
        success: function (data) {
          $(".content").append("========================================================================================");
        }
      });

      $.ajax({
        url: 'http://localhost:8081/findChats',
        type: 'GET',
        dataType: 'json',
        timeout: 1000,
        cache: false,
        success: function (data) {
          let str = '';
          for (let i = 0; i < data.length; i++) {
            str += data[i].id + "=======" + data[i].chatName + "=======" + data[i].chatHeadPhoto + "=======" + data[i].chatContent + "=======" + data[i].time + "=======" + data[i].uuid + "\n";
          }
          $(".content").append(str);
        }
      });
    },200)
  }
</script>
</html>
